<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!doctype html>
<html>
<head>
<meta charset="gbk">
<title>飞鸟博客 </title>
<meta name="keywords" content="个人博客,飞鸟博客,个人博客模板" />
<meta name="description" content="杨青个人博客，是一个站在web前端设计之路的女程序员个人网站，提供个人博客模板免费资源下载的个人原创网站。" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="${pageContext.request.contextPath}/static/view/images/logo.jpg" type="image/x-icon"/>
<link href="${pageContext.request.contextPath}/static/css/search.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/css/cms.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/lucene/css/base.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/lucene/css/index.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/static/lucene/css/m.css" rel="stylesheet">
<script src="${pageContext.request.contextPath}/static/lucene/js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/lucene/js/comm.js"></script>
<!--[if lt IE 9]>
<script src="js/modernizr.js"></script>
<![endif]-->
</head>
<body>
<header class="header-navigation" id="header">
  <nav><div class="logo"><a href="${pageContext.request.contextPath}/html/index.html">飞鸟博客</a></div>
    <h2 id="mnavh"><span class="navicon"></span></h2>
    <ul id="starlist">
      <!-- <li><a href="index.html">网站首页</a></li>
      <li><a href="share.html">我的相册</a></li>
      <li><a href="list.html">我的日记</a></li>
      <li><a href="about.html">关于我</a></li>
      <li><a href="gbook.html">留言</a></li>
      <li><a href="info.html">内容页</a></li>
      <li><a href="infopic.html">内容页</a></li> -->
      
      <li><a href="${pageContext.request.contextPath}/html/index.html" >网站首页</a></li>
            
      <c:forEach var="arcType" items="${arcTypeList}">
       <li><a href="${pageContext.request.contextPath}/arcType/${arcType.id}.html">${arcType.typeName }</a></li>
      </c:forEach>
      
    </ul>
</nav>
</header>
<div class="search">
        <form action="${pageContext.request.contextPath}/search/searchArticle.html" method="post" name="searchform" id="searchform">
          <c:choose>
            <c:when test="${not empty q}">
                <input name="searchStr" id="keyboard" class="input_text" value="${q}" style="color: rgb(153, 153, 153);" onfocus="if(value=='请输入关键字词'){this.style.color='#000';value=''}" onblur="if(value==''){this.style.color='#999';value='请输入关键字词'}" type="text">
            </c:when>
            <c:otherwise>
                <input name="searchStr" id="keyboard" class="input_text" value="请输入关键字词" style="color: rgb(153, 153, 153);" onfocus="if(value=='请输入关键字词'){this.style.color='#000';value=''}" onblur="if(value==''){this.style.color='#999';value='请输入关键字词'}" type="text">
            </c:otherwise>
          </c:choose>
          
          <input name="show" value="title" type="hidden">
          <input name="tempid" value="1" type="hidden">
          <input name="tbname" value="news" type="hidden">
          <input name="Submit" class="input_submit" value="搜索" type="submit">
        </form>
</div>
<article>
  <aside class="l_box">
      <!-- <div class="about_me">
        <h2>关于我</h2>
        <ul>
          <i><img src="images/4.jpg"></i>
          <p><b>杨青</b>，一个80后草根女站长！09年入行。一直潜心研究web前端技术，一边工作一边积累经验，分享一些个人博客模板，以及SEO优化等心得。</p>
        </ul>
      </div> -->
      <div class="tuijian">
        <h2>最近更新</h2>
        <ul>
        <c:forEach var="article" items="${articleNewstList }">
         <li>[<fmt:formatDate value="${article.publishDate }" pattern="MM-dd"/>]&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/article/${article.id }.html"
                                title="${article.title }"><font color="${article.titleColor }">

                <%-- ${fn:substring(article.title,0,20) } --%>
                                
                                <c:choose>  

                                 <c:when test="${fn:length(article.title) > 10}">  
                                
                                   ${fn:substring(article.title, 0, 10)}...
                                
                                  </c:when>  
                                
                                <c:otherwise>  
                                
                                    ${article.title}
                                
                                </c:otherwise>  
                                
                                </c:choose>  
            
            
            </font></a></li>
         </c:forEach>

        </ul>
      </div>
      
      <%-- <div class="fenlei">
        <h2>文章分类</h2>
        <ul>
        <c:forEach var="arcType" items="${arcTypeList}">
	       <li><a href="${pageContext.request.contextPath}/arcType/${arcType.id}.html">${arcType.typeName }</a></li>
	      </c:forEach>
          <!-- <li><a href="/">学无止境（33）</a></li>
          <li><a href="/">日记（19）</a></li>
          <li><a href="/">慢生活（520）</a></li>
          <li><a href="/">美文欣赏（40）</a></li> -->
        </ul>
      </div> --%>
      <div class="tuijian">
        <h2>站长推荐<span class="more" style="float: right; margin-right: 20px"><a href="${pageContext.request.contextPath}/arcType/1.html">更多...</a></span></h2>
        <ul>
        <c:forEach var="article" items="${RecommendArticleList }">
                         <li>[<fmt:formatDate value="${article.publishDate }" pattern="MM-dd"/>]&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/article/${article.id }.html"
                                title="${article.title }"><font color="${article.titleColor }">${fn:substring(article.title,0,10) }</font></a></li>
                         </c:forEach>   
         <!--  <li><a href="/">你是什么人便会遇上什么人</a></li>
          <li><a href="/">帝国cms 列表页调用子栏目，没有则不显示栏目名称</a></li>
          <li><a href="/">第二届 优秀个人博客模板比赛参选活动</a></li>
          <li><a href="/">个人博客模板《绅士》后台管理</a></li>
          <li><a href="/">你是什么人便会遇上什么人</a></li>
          <li><a href="/">帝国cms 列表页调用子栏目，没有则不显示栏目名称</a></li>
          <li><a href="/">第二届 优秀个人博客模板比赛参选活动</a></li>
          <li><a href="/">个人博客模板《绅士》后台管理</a></li> -->
        </ul>
      </div>
      <div class="links">
        <h2>友情链接</h2>
        <ul>
        <c:forEach var="link" items="${linkList}">
                    <li><a target="_blank" href="${link.url}">${link.name}</a></li>
                    </c:forEach>
          <!-- <a href="http://www.yangqq.com">杨青个人博客</a> <a href="http://www.yangqq.com">杨青博客</a> -->
        </ul>
      </div>
      <div class="guanzhu">
        <h2>关注我 么么哒 <span style="float: right; margin-right:10px; ">关于我</span></h2>
        <ul>
          <img src="${pageContext.request.contextPath}/static/images/微信公众号.jpg">
        </ul>
      </div>
  </aside>
  <main class="r_box">
  
    <c:choose>
        <c:when test="${articleList.size()==0 }">
            <div align="center" style="padding-top: 20px"><font color="red">${q}</font>未查询到结果，请换个关键字试试！</div>
        </c:when>
        <c:otherwise>
            <div align="center" style=" margin-bottom: 30px">
                                    查询<font color="red">${q}</font>关键字，约${resultTotal}条记录！
            </div>
            <c:forEach var="article" items="${articleList }" varStatus="status">
                
                <li>
				<h3><a href="${pageContext.request.contextPath}/article/${article.id}.html">${article.title}</a></h3>
				<p>${article.plaintxt}</p>
				</li>
              </c:forEach>
        </c:otherwise>
    </c:choose>
    
    <!-- 分页 -->
    <nav class="upAndDownPage">
        <ul class="pagination pagination-sm">
            ${pageHtml}
        </ul>
    </nav>
  </main>
</article>
<footer>
  <p>Design by <a href="https://hans1980775481.github.io" target="_blank">hans个人博客</a> <a href="/">蜀ICP备11002373号-1</a></p>
</footer>
<a href="#" class="cd-top">Top</a>
</body>
</html>

